﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="KMrpt20.aspx.cs" Inherits="KMrpt20" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>订单货期跟踪表</title>
    <script src="../js/jquery/jquery-1.8.1.min.js" type="text/javascript"></script>
    <script src="js/extTools.js" type="text/javascript"></script>
    <style type="text/css">
        .x-grid-row-over .x-grid-cell-inner
        {
            font-weight: bold;
        }
        .x-column-header-inner
        {
            height: 28px;
            background: #E7EBEF url(./images/header.png) repeat-x 0 0;
        }
    </style>
    <script type="text/javascript">
        var template = '<span style="color:{0};">{1}</span>';

        var change = function (value) {
            return Ext.String.format(template, (value > 0) ? "green" : "red", value);
        };
        var date = function (value) {
            //return Ext.util.Format.DateRenderer(value, 'yyyy-MM-dd'); 
            return Ext.util.Format.date(value, 'Y-m-d')
        };
        var pctChange = function (value) {
            return Ext.String.format(template, (value > 0) ? "green" : "red", value + "%");
        };
        //导出EXCEL 
        var exportData = function (format) {
            App.FormatType.setValue(format);
            var store = App.GridPanel1.store;
            store.submitData(null, { isUpload: true });
        };
        var saveData = function () {
            App.Hidden1.setValue(Ext.encode(App.GridPanel1.getRowsValues({ selectedOnly: false, currentPageOnly: true })));
        };
        var doSort = function () {
            App.Store1.sort(getSorters());
        };

        var getSorters = function () {
            var sorters = [];

            Ext.each(App.Toolbar2.query('button'), function (button) {
                sorters.push(button.sortData);
            }, this);

            return sorters;
        };

        var changeSortDirection = function (button, changeDirection) {
            var sortData = button.sortData,
                iconCls = button.iconCls;

            if (sortData) {
                if (changeDirection !== false) {
                    button.sortData.direction = Ext.String.toggle(button.sortData.direction, "ASC", "DESC");
                    button.setIconCls(Ext.String.toggle(iconCls, "icon-sortascending", "icon-sortdescending"));
                }
                App.Store1.clearFilter();
                doSort();
            }
        };

        var createItem = function (data) {
            var header = data.header,
                headerCt = header.ownerCt,
                reorderer = headerCt.reorderer;

            // Hide the drop indicators of the standard HeaderDropZone
            // in case user had a pending valid drop in 
            if (reorderer) {
                reorderer.dropZone.invalidateDrop();
            }
            return createSorterButtonConfig({
                text: header.text,
                sortData: {
                    property: header.dataIndex,
                    direction: "s"
                }
            });
        };

        var createSorterButtonConfig = function (config) {
            config = config || {};

            Ext.applyIf(config, {
                listeners: {
                    click: function (button, e) {
                        changeSortDirection(button, true);
                    }
                },
                iconCls: config.sortData.direction.toLowerCase() == "asc" ? "icon-sortascending" : "icon-sortdescending",
                reorderable: true,
                xtype: 'splitbutton',
                menu: {
                    xtype: "menu",
                    items: [
                        {
                            text: "移除",
                            handler: remove
                        }
                    ]
                }
            });

            return config;
        };

        var canDrop = function (dragSource, event, data) {
            var sorters = getSorters(),
                header = data.header,
                length = sorters.length,
                entryIndex = this.calculateEntryIndex(event),
                targetItem = this.toolbar.getComponent(entryIndex),
                i;

            // Group columns have no dataIndex and therefore cannot be sorted
            // If target isn't reorderable it could not be replaced
            if (!header.dataIndex || (targetItem && targetItem.reorderable === false)) {
                return false;
            }

            for (i = 0; i < length; i++) {
                if (sorters[i].property == header.dataIndex) {
                    return false;
                }
            }

            return true;
        };

        var remove = function (menu) {
            App.Toolbar2.remove(menu.up('button'));
            App.Store1.clearFilter();
            doSort();
        };
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Neptune" />
        <ext:Viewport ID="Viewport1" runat="server" Layout="FitLayout">
            <Items>
                <ext:Hidden ID="FormatType" runat="server" />
                <ext:Hidden ID="Hidden1" runat="server" />
                <ext:GridPanel ID="GridPanel1" runat="server" TitleAlign="Center">
                    <TopBar>
                        <ext:Toolbar ID="Toolbar1" runat="server" Layout="Container">
                            <Items>
                                <ext:Toolbar runat="server">
                                    <Items>
                                        <ext:DateField runat="server" ID="txtbdate" FieldLabel="开单日期" />
                                        <ext:Label runat="server" Text="-">
                                        </ext:Label>
                                        <ext:DateField runat="server" ID="txtedate" />
                                        <ext:MultiCombo ID="txtstatus" runat="server" SelectionMode="All" FieldLabel="单据状态"
                                            DisplayField="statename" ValueField="stateid">
                                            <Store>
                                                <ext:Store ID="Store2" runat="server">
                                                    <Model>
                                                        <ext:Model ID="Model2" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="stateid" />
                                                                <ext:ModelField Name="statename" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                        </ext:MultiCombo>
                                        <ext:MultiCombo runat="server" ID="txtseason" FieldLabel="季节" DisplayField="seasonname"
                                            ValueField="seasonname">
                                            <Store>
                                                <ext:Store runat="server" ID="Store4">
                                                    <Model>
                                                        <ext:Model ID="Model4" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="seasonname" />
                                                                <ext:ModelField Name="seasonname" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                        <ext:Button ID="Button1" runat="server" Text="查询" OnDirectClick="BtnQureyUser" UI="Info"
                                            Icon="Find">
                                            <DirectEvents>
                                                <Click Timeout="300000">
                                                    <EventMask ShowMask="true" Msg="加载中...">
                                                    </EventMask>
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                    </Items>
                                </ext:Toolbar>
                                <ext:Toolbar runat="server">
                                    <Items>
                                        <ext:DateField runat="server" ID="txtbjhdate" FieldLabel="交货日期" />
                                        <ext:Label ID="Label2" runat="server" Text="-">
                                        </ext:Label>
                                        <ext:DateField runat="server" ID="txtejhdate" />
                                        <ext:ComboBox runat="server" ID="txtvendor" FieldLabel="供应商" DisplayField="vendcustname"
                                            ValueField="vendcustid">
                                            <Store>
                                                <ext:Store runat="server">
                                                    <Model>
                                                        <ext:Model runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="vendcustid" />
                                                                <ext:ModelField Name="vendcustname" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                            </Items>
                                        </ext:ComboBox>
                                        <ext:MultiCombo runat="server" ID="txtyear" FieldLabel="年份" DisplayField="yearno"
                                            ValueField="yearno">
                                            <Store>
                                                <ext:Store runat="server" ID="Store3">
                                                    <Model>
                                                        <ext:Model ID="Model3" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="yearno" />
                                                                <ext:ModelField Name="yearno" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                    </Items>
                                </ext:Toolbar>
                                <ext:Toolbar runat="server">
                                    <Items>
                                        <ext:DateField runat="server" ID="txtsrkdate" FieldLabel="入库日期" />
                                        <ext:Label ID="Label3" runat="server" Text="-">
                                        </ext:Label>
                                        <ext:DateField runat="server" ID="txterkdate" />
                                        <ext:MultiCombo runat="server" ID="txtmatkind" FieldLabel="类别" DisplayField="kindname"
                                            ValueField="kindname">
                                            <Store>
                                                <ext:Store runat="server" ID="Store5">
                                                    <Model>
                                                        <ext:Model ID="Model5" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="kindname" />
                                                                <ext:ModelField Name="kindname" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                        <ext:TextField runat="server" ID="txtmatname" FieldLabel="货品简称" />
                                    </Items>
                                </ext:Toolbar>
                                <ext:Toolbar runat="server">
                                    <Items>
                                        <ext:DateField runat="server" ID="txtsdhdate" FieldLabel="到货日期" />
                                        <ext:Label ID="Label4" runat="server" Text="-">
                                        </ext:Label>
                                        <ext:DateField runat="server" ID="txtedhdate" />
                                        <ext:TextField runat="server" ID="txtmatcode" FieldLabel="货号" />
                                        <ext:MultiCombo runat="server" ID="cb_sex" FieldLabel="性别" DisplayField="sexname"
                                            ValueField="sexname">
                                            <Store>
                                                <ext:Store runat="server" ID="Store_sex">
                                                    <Model>
                                                        <ext:Model ID="Model6" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="sexname" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                    </Items>
                                </ext:Toolbar>
                                <ext:Toolbar ID="Toolbar2" runat="server">
                                    <Items>
                                        <ext:ToolbarTextItem ID="ToolbarTextItem1" runat="server" Text="排序区域:" Reorderable="false" />
                                        <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server" Reorderable="false" />
                                    </Items>
                                    <Plugins>
                                        <ext:BoxReorderer ID="BoxReorderer1" runat="server">
                                            <Listeners>
                                                <Drop Handler="changeSortDirection(dragCmp, false);" />
                                            </Listeners>
                                        </ext:BoxReorderer>
                                        <ext:ToolbarDroppable ID="ToolbarDroppable1" runat="server">
                                            <CreateItem Fn="createItem" />
                                            <CanDrop Fn="canDrop" />
                                            <Listeners>
                                                <Drop Fn="doSort" />
                                            </Listeners>
                                        </ext:ToolbarDroppable>
                                    </Plugins>
                                </ext:Toolbar>
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
                    <Store>
                        <ext:Store ID="Store1" runat="server" PageSize="500" OnReadData="RefreshDataSet">
                           <%-- OnSubmitData="Store1_Submit">--%>
                            <Model>
                                <ext:Model ID="Model1" runat="server" IDProperty="ItemID">
                                    <Fields>
                                        <ext:ModelField Name="ItemID" ServerMapping="ItemID" Type="String" />
                                        <ext:ModelField Name="类别" ServerMapping="KindName" Type="String" />
                                        <ext:ModelField Name="季节" ServerMapping="SeasonName" Type="String" />
                                        <ext:ModelField Name="开单日期" ServerMapping="BillDate" Type="String" />
                                        <ext:ModelField Name="单据状态" ServerMapping="cnstatename" Type="String" />
                                        <ext:ModelField Name="合同状态" ServerMapping="ContractStatus" Type="String" />
                                        <ext:ModelField Name="订单性质" ServerMapping="OrderProperty" Type="String" />
                                        <ext:ModelField Name="拟定上市日期" ServerMapping="ProSaleDate" Type="String" />
                                        <ext:ModelField Name="款号" ServerMapping="StyleCode" Type="String" />
                                        <ext:ModelField Name="货品ID" ServerMapping="MaterialID" Type="String" />
                                        <ext:ModelField Name="货号" ServerMapping="MaterialCode" Type="String" />
                                        <ext:ModelField Name="系列" ServerMapping="SeriesName" Type="String" />
                                        <ext:ModelField Name="货品简称" ServerMapping="MaterialShortName" Type="String" />
                                        <ext:ModelField Name="项目" ServerMapping="ItemName" Type="String" />
                                        <ext:ModelField Name="颜色" ServerMapping="ColorName" Type="String" />
                                        <ext:ModelField Name="色号" ServerMapping="ColorCode" Type="String" />
                                        <ext:ModelField Name="供应商编号" ServerMapping="VendCustCode" Type="String" />
                                        <ext:ModelField Name="供应商" ServerMapping="VendCustName" Type="String" />
                                        <ext:ModelField Name="订单结算价" ServerMapping="Price" Type="Float" />
                                        <ext:ModelField Name="吊牌价" ServerMapping="RetailPrice" Type="String" />
                                        <ext:ModelField Name="订单数量" ServerMapping="Qty" Type="Float" />
                                        <ext:ModelField Name="订单吊牌额" ServerMapping="RetailAmt" Type="Float" />
                                        <ext:ModelField Name="交货月份" ServerMapping="JhMonth" Type="String" />
                                        <ext:ModelField Name="交货周" ServerMapping="JhWeek" Type="String" />
                                        <ext:ModelField Name="交货日期" ServerMapping="RequireDate" Type="String" />
                                        <ext:ModelField Name="外发日期" ServerMapping="WWDate" Type="String" />
                                        <ext:ModelField Name="订单剩余量" ServerMapping="OrdBalanceQty" Type="String" />
                                        <ext:ModelField Name="订单剩余额" ServerMapping="OrdBalanceAmt" Type="Float" />
                                        <ext:ModelField Name="交货情况" ServerMapping="OrdBlanceDesc" Type="String" />
                                        <ext:ModelField Name="单据类型" ServerMapping="BillTypeName" Type="String" />
                                        <ext:ModelField Name="订单号" ServerMapping="OrderCode" Type="String" />
                                        <ext:ModelField Name="制单号" ServerMapping="FactCode" Type="String" />
                                        <ext:ModelField Name="第一次到货日期" ServerMapping="fri_dhtz_Date" Type="String" />
                                        <ext:ModelField Name="第一次QA检验日期" ServerMapping="fri_wfsh_Date" Type="String" />
                                        <ext:ModelField Name="第一次入库日期" ServerMapping="fri_wfrk_Date" Type="String" />
                                        <ext:ModelField Name="第一次到货数量" ServerMapping="fri_dhtz_Qty" Type="Float" />
                                        <ext:ModelField Name="第一次QA检验数量" ServerMapping="fri_wfsh_Qty" Type="Float" />
                                        <ext:ModelField Name="第一次入库数量" ServerMapping="fri_wfrk_Qty" Type="Float" />
                                        <ext:ModelField Name="第一次到货金额" ServerMapping="fri_dhtz_Amt" Type="Float" />
                                        <ext:ModelField Name="第一次QA检验金额" ServerMapping="fri_wfsh_Amt" Type="Float" />
                                        <ext:ModelField Name="第一次入库金额" ServerMapping="fri_wfrk_Amt" Type="Float" />
                                        <ext:ModelField Name="第一次交货情况" ServerMapping="fir_rkBalanceDesc" Type="String" />
                                        <ext:ModelField Name="第二次到货日期" ServerMapping="secd_dhtz_Date" Type="String" />
                                        <ext:ModelField Name="第二次QA检验日期" ServerMapping="secd_wfsh_Date" Type="String" />
                                        <ext:ModelField Name="第二次入库日期" ServerMapping="secd_wfrk_Date" Type="String" />
                                        <ext:ModelField Name="第二次到货数量" ServerMapping="secd_dhtz_Qty" Type="Float" />
                                        <ext:ModelField Name="第二次QA检验数量" ServerMapping="secd_wfsh_Qty" Type="Float" />
                                        <ext:ModelField Name="第二次入库数量" ServerMapping="secd_wfrk_Qty" Type="Float" />
                                        <ext:ModelField Name="第二次到货金额" ServerMapping="secd_dhtz_Amt" Type="Float" />
                                        <ext:ModelField Name="第二次QA检验金额" ServerMapping="secd_wfsh_Amt" Type="Float" />
                                        <ext:ModelField Name="第二次入库金额" ServerMapping="secd_wfrk_Amt" Type="Float" />
                                        <ext:ModelField Name="第二次交货情况" ServerMapping="secd_rkBalanceDesc" Type="String" />
                                        <ext:ModelField Name="第三次到货日期" ServerMapping="last_dhtz_Date" Type="String" />
                                        <ext:ModelField Name="第三次QA检验日期" ServerMapping="last_wfsh_Date" Type="String" />
                                        <ext:ModelField Name="第三次入库日期" ServerMapping="last_wfrk_Date" Type="String" />
                                        <ext:ModelField Name="第三次到货数量" ServerMapping="last_dhtz_Qty" Type="Float" />
                                        <ext:ModelField Name="第三次QA检验数量" ServerMapping="last_wfsh_Qty" Type="Float" />
                                        <ext:ModelField Name="第三次入库数量" ServerMapping="last_wfrk_Qty" Type="Float" />
                                        <ext:ModelField Name="第三次到货金额" ServerMapping="last_dhtz_Amt" Type="Float" />
                                        <ext:ModelField Name="第三次QA检验金额" ServerMapping="last_wfsh_Amt" Type="Float" />
                                        <ext:ModelField Name="第三次入库金额" ServerMapping="last_wfrk_Amt" Type="Float" />
                                        <ext:ModelField Name="第三次交货情况" ServerMapping="last_rkBalanceDesc" Type="String" />
                                        <ext:ModelField Name="总到货数量" ServerMapping="dhtz_tot" Type="Float" />
                                        <ext:ModelField Name="总到货额" ServerMapping="dhtz_Amt" Type="Float" />
                                        <ext:ModelField Name="总入库数量" ServerMapping="wfrk_tot" Type="Float" />
                                        <ext:ModelField Name="总入库金额" ServerMapping="wfrk_Amt" Type="Float" />
                                        <ext:ModelField Name="po28" ServerMapping="28" Type="Float" />
                                        <ext:ModelField Name="po29" ServerMapping="29" Type="Float" />
                                        <ext:ModelField Name="po30" ServerMapping="30" Type="Float" />
                                        <ext:ModelField Name="po31" ServerMapping="31" Type="Float" />
                                        <ext:ModelField Name="po32" ServerMapping="32" Type="Float" />
                                        <ext:ModelField Name="po33" ServerMapping="33" Type="Float" />
                                        <ext:ModelField Name="po34" ServerMapping="34" Type="Float" />

                                        <ext:ModelField Name="po35" ServerMapping="35" Type="Float" />

                                        <ext:ModelField Name="po36" ServerMapping="36" Type="Float" />
                                        <ext:ModelField Name="po38" ServerMapping="38" Type="Float" />
                                        <ext:ModelField Name="dh28" ServerMapping="dh28" Type="Float" />
                                        <ext:ModelField Name="dh29" ServerMapping="dh29" Type="Float" />
                                        <ext:ModelField Name="dh30" ServerMapping="dh30" Type="Float" />
                                        <ext:ModelField Name="dh31" ServerMapping="dh31" Type="Float" />
                                        <ext:ModelField Name="dh32" ServerMapping="dh32" Type="Float" />
                                        <ext:ModelField Name="dh33" ServerMapping="dh33" Type="Float" />
                                        <ext:ModelField Name="dh34" ServerMapping="dh34" Type="Float" />

                                        <ext:ModelField Name="dh35" ServerMapping="dh35" Type="Float" />

                                        <ext:ModelField Name="dh36" ServerMapping="dh36" Type="Float" />
                                        <ext:ModelField Name="dh38" ServerMapping="dh38" Type="Float" />
                                        <ext:ModelField Name="rk28" ServerMapping="rk28" Type="Float" />
                                        <ext:ModelField Name="rk29" ServerMapping="rk29" Type="Float" />
                                        <ext:ModelField Name="rk30" ServerMapping="rk30" Type="Float" />
                                        <ext:ModelField Name="rk31" ServerMapping="rk31" Type="Float" />
                                        <ext:ModelField Name="rk32" ServerMapping="rk32" Type="Float" />
                                        <ext:ModelField Name="rk33" ServerMapping="rk33" Type="Float" />
                                        <ext:ModelField Name="rk34" ServerMapping="rk34" Type="Float" />

                                        <ext:ModelField Name="rk35" ServerMapping="rk35" Type="Float" />

                                        <ext:ModelField Name="rk36" ServerMapping="rk36" Type="Float" />
                                        <ext:ModelField Name="rk38" ServerMapping="rk38" Type="Float" />
                                        <ext:ModelField Name="制单数量" ServerMapping="madeQty" Type="Float" />
                                        <ext:ModelField Name="制单差异数" ServerMapping="relQty" Type="Float" />
                                        <ext:ModelField Name="设计号" ServerMapping="DesignNo" Type="String" />
                                        <ext:ModelField Name="设计师" ServerMapping="DesignerName" Type="String" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel>
                        <Columns>
                            <ext:Column ID="Column1" runat="server" Text="类别" DataIndex="类别" />
                            <ext:Column ID="Column2" runat="server" Text="季节" DataIndex="季节" />
                            <ext:Column ID="Column3" runat="server" Text="开单日期" DataIndex="开单日期" Width="120">
                                <Renderer Fn="date" />
                            </ext:Column>
                            <ext:Column ID="Column95" runat="server" Text="单据状态" DataIndex="单据状态" />
                            <ext:Column ID="Column99" runat="server" Text="合同状态" DataIndex="合同状态" />
                            <ext:Column ID="Column100" runat="server" Text="订单性质" DataIndex="订单性质" />
                            <ext:Column ID="Column102" runat="server" Text="拟定上市日期" DataIndex="拟定上市日期" Width="120" />
                            <ext:Column ID="Column4" runat="server" Text="款号" DataIndex="款号" />
                            <ext:Column ID="Column7" runat="server" Text="货号" DataIndex="货号" Width="120" />
                            <ext:Column ID="Column5" runat="server" Text="系列" DataIndex="系列" />
                            <ext:Column ID="Column6" runat="server" Text="货品简称" DataIndex="货品简称" Width="150" />
                            <ext:Column ID="Column8" runat="server" Text="项目" DataIndex="项目" />
                            <ext:Column ID="Column9" runat="server" Text="颜色" DataIndex="颜色" />
                            <ext:Column ID="Column10" runat="server" Text="色号" DataIndex="色号" />
                            <ext:Column ID="Column98" runat="server" Text="设计号" DataIndex="设计号" />
                            <ext:Column ID="Column101" runat="server" Text="设计师" DataIndex="设计师" />
                            <ext:Column ID="Column11" runat="server" Text="供应商编号" DataIndex="供应商编号" />
                            <ext:Column ID="Column12" runat="server" Text="供应商" DataIndex="供应商" />
                            <ext:Column ID="Column13" runat="server" Text="订单结算价" DataIndex="订单结算价" />
                            <ext:Column ID="Column14" runat="server" Text="吊牌价" DataIndex="吊牌价" />
                            <ext:Column ID="Column15" runat="server" Text="订单数量" DataIndex="订单数量" />
                            <ext:Column ID="Column16" runat="server" Text="订单吊牌额" DataIndex="订单吊牌额" />
                            <ext:Column ID="Column17" runat="server" Text="交货月份" DataIndex="交货月份" />
                            <ext:Column ID="Column18" runat="server" Text="交货周" DataIndex="交货周" />
                            <ext:Column ID="Column19" runat="server" Text="合同日期" DataIndex="交货日期" Width="120">
                                <Renderer Fn="date" />
                            </ext:Column>
                            <ext:Column ID="Column20" runat="server" Text="反馈日期" DataIndex="外发日期" Width="120">
                                <Renderer Fn="date" />
                            </ext:Column>
                            <ext:Column ID="Column21" runat="server" Text="订单剩余量" DataIndex="订单剩余量" />
                            <ext:Column ID="Column22" runat="server" Text="订单剩余额" DataIndex="订单剩余额" />
                            <ext:Column ID="Column23" runat="server" Text="交货情况" DataIndex="交货情况" />
                            <ext:Column ID="Column94" runat="server" Text="单据类型" DataIndex="单据类型" Width="120" />
                            <ext:Column ID="Column24" runat="server" Text="订单号" DataIndex="订单号" Width="150" />
                            <ext:Column ID="Column25" runat="server" Text="制单号" DataIndex="制单号" Width="150" />
                            <ext:Column runat="server" Text="第一次">
                                <Columns>
                                    <ext:Column ID="Column26" runat="server" Text="第一次到货日期" DataIndex="第一次到货日期" Width="120">
                                        <Renderer Fn="date" />
                                    </ext:Column>
                                    <ext:Column ID="Column27" runat="server" Text="第一次QA检验日期" DataIndex="第一次QA检验日期" Width="120">
                                        <Renderer Fn="date" />
                                    </ext:Column>
                                    <ext:Column ID="Column28" runat="server" Text="第一次入库日期" DataIndex="第一次入库日期" Width="120">
                                        <Renderer Fn="date" />
                                    </ext:Column>
                                    <ext:Column ID="Column29" runat="server" Text="第一次到货数量" DataIndex="第一次到货数量" Width="150" />
                                    <ext:Column ID="Column30" runat="server" Text="第一次QA检验数量" DataIndex="第一次QA检验数量" Width="150" />
                                    <ext:Column ID="Column31" runat="server" Text="第一次入库数量" DataIndex="第一次入库数量" Width="150" />
                                    <ext:Column ID="Column32" runat="server" Text="第一次到货金额" DataIndex="第一次到货金额" Width="150" />
                                    <ext:Column ID="Column33" runat="server" Text="第一次QA检验金额" DataIndex="第一次QA检验金额" Width="150" />
                                    <ext:Column ID="Column34" runat="server" Text="第一次入库金额" DataIndex="第一次入库金额" Width="150" />
                                    <ext:Column ID="Column35" runat="server" Text="第一次交货情况" DataIndex="第一次交货情况" Width="150" />
                                </Columns>
                            </ext:Column>
                            <ext:Column ID="Column36" runat="server" Text="第二次">
                                <Columns>
                                    <ext:Column ID="Column37" runat="server" Text="第二次到货日期" DataIndex="第二次到货日期" Width="120">
                                        <Renderer Fn="date" />
                                    </ext:Column>
                                    <ext:Column ID="Column38" runat="server" Text="第二次QA检验日期" DataIndex="第二次QA检验日期" Width="120">
                                        <Renderer Fn="date" />
                                    </ext:Column>
                                    <ext:Column ID="Column39" runat="server" Text="第二次入库日期" DataIndex="第二次入库日期" Width="120">
                                        <Renderer Fn="date" />
                                    </ext:Column>
                                    <ext:Column ID="Column40" runat="server" Text="第二次到货数量" DataIndex="第二次到货数量" Width="150" />
                                    <ext:Column ID="Column41" runat="server" Text="第二次QA检验数量" DataIndex="第二次QA检验数量" Width="150" />
                                    <ext:Column ID="Column42" runat="server" Text="第二次入库数量" DataIndex="第二次入库数量" Width="150" />
                                    <ext:Column ID="Column43" runat="server" Text="第二次到货金额" DataIndex="第二次到货金额" Width="150" />
                                    <ext:Column ID="Column44" runat="server" Text="第二次QA检验金额" DataIndex="第二次QA检验金额" Width="150" />
                                    <ext:Column ID="Column45" runat="server" Text="第二次入库金额" DataIndex="第二次入库金额" Width="150" />
                                    <ext:Column ID="Column46" runat="server" Text="第二次交货情况" DataIndex="第二次交货情况" Width="150" />
                                </Columns>
                            </ext:Column>
                            <ext:Column ID="Column47" runat="server" Text="第三次">
                                <Columns>
                                    <ext:Column ID="Column48" runat="server" Text="第三次到货日期" DataIndex="第三次到货日期" Width="120">
                                        <Renderer Fn="date" />
                                    </ext:Column>
                                    <ext:Column ID="Column49" runat="server" Text="第三次QA检验日期" DataIndex="第三次QA检验日期" Width="120">
                                        <Renderer Fn="date" />
                                    </ext:Column>
                                    <ext:Column ID="Column50" runat="server" Text="第三次入库日期" DataIndex="第三次入库日期" Width="120">
                                        <Renderer Fn="date" />
                                    </ext:Column>
                                    <ext:Column ID="Column51" runat="server" Text="第三次到货数量" DataIndex="第三次到货数量" Width="150" />
                                    <ext:Column ID="Column52" runat="server" Text="第三次QA检验数量" DataIndex="第三次QA检验数量" Width="150" />
                                    <ext:Column ID="Column53" runat="server" Text="第三次入库数量" DataIndex="第三次入库数量" Width="150" />
                                    <ext:Column ID="Column54" runat="server" Text="第三次到货金额" DataIndex="第三次到货金额" Width="150" />
                                    <ext:Column ID="Column55" runat="server" Text="第三次QA检验金额" DataIndex="第三次QA检验金额" Width="150" />
                                    <ext:Column ID="Column56" runat="server" Text="第三次入库金额" DataIndex="第三次入库金额" Width="150" />
                                    <ext:Column ID="Column57" runat="server" Text="第三次交货情况" DataIndex="第三次交货情况" Width="150" />
                                </Columns>
                            </ext:Column>
                            <ext:Column ID="Column58" runat="server" Text="总到货数量" DataIndex="总到货数量" />
                            <ext:Column ID="Column59" runat="server" Text="总到货额" DataIndex="总到货额" />
                            <ext:Column ID="Column60" runat="server" Text="总入库数量" DataIndex="总入库数量" />
                            <ext:Column ID="Column61" runat="server" Text="总入库金额" DataIndex="总入库金额" />
                            <ext:Column ID="Column62" runat="server" Text="订单取消数量" DataIndex="订单取消数量" />
                            <ext:Column ID="Column63" runat="server" Text="订单取消数量" DataIndex="订单取消金额" />
                            <ext:Column ID="Column64" runat="server" Text="订单尺码明细">
                                <Columns>
                                    <ext:Column ID="Column65" runat="server" Text="S/28/39" DataIndex="po28" />
                                    <ext:Column ID="Column66" runat="server" Text="M/29/40" DataIndex="po29" />
                                    <ext:Column ID="Column67" runat="server" Text="L/30/41" DataIndex="po30" />
                                    <ext:Column ID="Column68" runat="server" Text="XL/31/42" DataIndex="po31" />
                                    <ext:Column ID="Column69" runat="server" Text="XXL/32/43" DataIndex="po32" />
                                    <ext:Column ID="Column70" runat="server" Text="3XL/33" DataIndex="po33" />
                                    <ext:Column ID="Column71" runat="server" Text="4XL/34" DataIndex="po34" />

                                    <ext:Column ID="Columnpo35" runat="server" Text="XS/35" DataIndex="po35" />

                                    <ext:Column ID="Column72" runat="server" Text="36" DataIndex="po36" />
                                    <ext:Column ID="Column73" runat="server" Text="38" DataIndex="po38" />
                                </Columns>
                            </ext:Column>
                            <ext:Column ID="Column74" runat="server" Text="到货尺码明细">
                                <Columns>
                                    <ext:Column ID="Column75" runat="server" Text="S/28/39" DataIndex="dh28" />
                                    <ext:Column ID="Column76" runat="server" Text="M/29/40" DataIndex="dh29" />
                                    <ext:Column ID="Column77" runat="server" Text="L/30/41" DataIndex="dh30" />
                                    <ext:Column ID="Column78" runat="server" Text="XL/31/42" DataIndex="dh31" />
                                    <ext:Column ID="Column79" runat="server" Text="XXL/32/43" DataIndex="dh32" />
                                    <ext:Column ID="Column80" runat="server" Text="3XL/33" DataIndex="dh33" />
                                    <ext:Column ID="Column81" runat="server" Text="4XL/34" DataIndex="dh34" />

                                    <ext:Column ID="Columndh35" runat="server" Text="XS/35" DataIndex="dh35" />

                                    <ext:Column ID="Column82" runat="server" Text="36" DataIndex="dh36" />
                                    <ext:Column ID="Column83" runat="server" Text="38" DataIndex="dh38" />
                                </Columns>
                            </ext:Column>
                            <ext:Column ID="Column84" runat="server" Text="入库尺码明细">
                                <Columns>
                                    <ext:Column ID="Column85" runat="server" Text="S/28/39" DataIndex="rk28" />
                                    <ext:Column ID="Column86" runat="server" Text="M/29/40" DataIndex="rk29" />
                                    <ext:Column ID="Column87" runat="server" Text="L/30/41" DataIndex="rk30" />
                                    <ext:Column ID="Column88" runat="server" Text="XL/31/42" DataIndex="rk31" />
                                    <ext:Column ID="Column89" runat="server" Text="XXL/32/43" DataIndex="rk32" />
                                    <ext:Column ID="Column90" runat="server" Text="3XL/33" DataIndex="rk33" />
                                    <ext:Column ID="Column91" runat="server" Text="4XL/34" DataIndex="rk34" />

                                    <ext:Column ID="Columnrk35" runat="server" Text="XS/35" DataIndex="rk35" />

                                    <ext:Column ID="Column92" runat="server" Text="36" DataIndex="rk36" />
                                    <ext:Column ID="Column93" runat="server" Text="38" DataIndex="rk38" />
                                </Columns>
                            </ext:Column>
                            <ext:Column ID="Column96" runat="server" Text="制单数量" DataIndex="制单数量" />
                            <ext:Column ID="Column97" runat="server" Text="制单差异数" DataIndex="制单差异数" />
                        </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
                    </SelectionModel>
                    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolbar1" runat="server">
                            <Items>
                                <ext:Label ID="Label1" runat="server" Text="每页显示:" />
                                <ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
                                <ext:ComboBox ID="ComboBox1" runat="server" Width="80">
                                    <Items>
                                        <ext:ListItem Text="500" />
                                        <ext:ListItem Text="1000" />
                                        <ext:ListItem Text="2000" />
                                        <ext:ListItem Text="3000" />
                                    </Items>
                                    <SelectedItems>
                                        <ext:ListItem Value="500" />
                                    </SelectedItems>
                                    <Listeners>
                                        <Select Handler="#{GridPanel1}.store.pageSize = parseInt(this.getValue(), 10); #{GridPanel1}.store.reload();" />
                                    </Listeners>
                                </ext:ComboBox>
                                <ext:Button ID="Button2" runat="server" Text="导出Excel" Icon="PageExcel" Visible="false">
                                    <Listeners>
                                        <Click Handler="exportData('xls');" />
                                    </Listeners>
                                </ext:Button>
                                <ext:Button ID="Button3" runat="server" Text="导出(当前页)" AutoPostBack="true" OnClick="ToExcel"
                                    Icon="PageExcel">
                                    <Listeners>
                                        <Click Fn="saveData" />
                                    </Listeners>
                                </ext:Button>
                                <ext:Button ID="Button4" runat="server" Text="导出EXCEL" OnDirectClick="BtnOutExcel"
                                    UI="Info" Icon="PageExcel" Visible="true">
                                    <DirectEvents>
                                        <Click Timeout="90000">
                                            <EventMask ShowMask="true" Msg="正在生成下载文件...">
                                            </EventMask>
                                        </Click>
                                    </DirectEvents>
                                </ext:Button>
                            </Items>
                            <Plugins>
                                <ext:ProgressBarPager ID="ProgressBarPager1" runat="server" />
                            </Plugins>
                        </ext:PagingToolbar>
                    </BottomBar>
                    <Listeners>
                        <AfterLayout Handler="#{ToolbarDroppable1}.addDDGroup(this.child('headercontainer').reorderer.dragZone.ddGroup); doSort();"
                            Single="true" />
                    </Listeners>
                </ext:GridPanel>
            </Items>
        </ext:Viewport>
    </div>
    </form>
</body>
</html>
